Meaning of the word "the joke is on someone" in English

What does "the joke is on someone" mean in English? Explore the meaning, pronunciation, and specific usage of this word with Lingoland.

the joke is on someone

US /ðə dʒoʊk ɪz ɑn ˈsʌmˌwʌn/
UK /ðə dʒəʊk ɪz ɒn ˈsʌmˌwʌn/
"the joke is on someone" picture

Idiom

used to say that someone who has tried to make another person look silly has in fact been made to look silly themselves

Example:
He thought he was being clever by tricking me, but the joke is on him now that I've exposed his lies.
They tried to embarrass her with a prank, but when it backfired, the joke was on them.